package com.montran.manager;

import java.util.List;

import com.entidades.xml.Family;
import com.montran.generatedID.GeneratedID;
import com.persistencia.Persistence;
import com.persistencia.XMLPersistence;

public class ManagerFamily {
	/** The DATAMANAGER instance. */
	private final Persistence<Family> DATA_MANAGER;
	private GeneratedID gID;
	public ManagerFamily() {
		DATA_MANAGER = new XMLPersistence<Family>(
					Family.class);
		gID = GeneratedID.getInstance();
	}

	public Boolean create(Family entidad) {
		entidad.setId(gID.generatedId(Family.class,'F'));
		return DATA_MANAGER.create(entidad);

	}

	public List<Family> findAll() {
		return DATA_MANAGER.findAll();
	}

	public Family findById(String id) {

		return DATA_MANAGER.findById(id);
	}

	public Boolean update(Family entidad) {

		return DATA_MANAGER.update(entidad);
	}

	public Boolean delete(String id) {
		return DATA_MANAGER.delete(id);
	}

	
}
